{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true,
    "pycharm": {
     "is_executing": true
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "text": [
      "Using TensorFlow backend.\n",
      "WARNING: Logging before flag parsing goes to stderr.\nW0823 00:46:39.163710  4284 deprecation_wrapper.py:119] From c:\\users\\s-vec\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\keras\\backend\\tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n\n",
      "W0823 00:46:39.177641  4284 deprecation_wrapper.py:119] From c:\\users\\s-vec\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\keras\\backend\\tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n\n",
      "W0823 00:46:39.188646  4284 deprecation_wrapper.py:119] From c:\\users\\s-vec\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\keras\\backend\\tensorflow_backend.py:245: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n\n",
      "W0823 00:46:39.189609  4284 deprecation_wrapper.py:119] From c:\\users\\s-vec\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\keras\\backend\\tensorflow_backend.py:174: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.\n\n",
      "W0823 00:46:39.189609  4284 deprecation_wrapper.py:119] From c:\\users\\s-vec\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\keras\\backend\\tensorflow_backend.py:181: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n\n",
      "W0823 00:46:40.405389  4284 deprecation.py:506] From c:\\users\\s-vec\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\keras\\backend\\tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\nInstructions for updating:\nPlease use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n",
      "W0823 00:46:40.745447  4284 deprecation_wrapper.py:119] From c:\\users\\s-vec\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\keras\\optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.\n\n",
      "W0823 00:46:40.855153  4284 deprecation.py:323] From c:\\users\\s-vec\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\tensorflow\\python\\ops\\math_grad.py:1250: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\nInstructions for updating:\nUse tf.where in 2.0, which has the same broadcast rule as np.where\n"
     ],
     "output_type": "stream"
    },
    {
     "name": "stdout",
     "text": [
      "Processing 0 of 4000\n",
      "Processing 1 of 4000\n",
      "Processing 2 of 4000\n",
      "Processing 3 of 4000\n",
      "Processing 4 of 4000\n",
      "Processing 5 of 4000\n",
      "Processing 6 of 4000\n",
      "Processing 7 of 4000\n",
      "Processing 8 of 4000\n",
      "Processing 9 of 4000\n",
      "Processing 10 of 4000\n",
      "Processing 11 of 4000\n",
      "Processing 12 of 4000\n",
      "Processing 13 of 4000\n",
      "Processing 14 of 4000\n",
      "Processing 15 of 4000\n",
      "Processing 16 of 4000\n",
      "Processing 17 of 4000\n",
      "Processing 18 of 4000\n",
      "Processing 19 of 4000\n",
      "Processing 20 of 4000\n",
      "Processing 21 of 4000\n",
      "Processing 22 of 4000\n",
      "Processing 23 of 4000\n",
      "Processing 24 of 4000\n",
      "Processing 25 of 4000\n",
      "Processing 26 of 4000\n",
      "Processing 27 of 4000\n",
      "Processing 28 of 4000\n",
      "Processing 29 of 4000\n",
      "Processing 30 of 4000\n",
      "Processing 31 of 4000\n",
      "Processing 32 of 4000\n",
      "Processing 33 of 4000\n",
      "Processing 34 of 4000\n",
      "Processing 35 of 4000\n",
      "Processing 36 of 4000\n",
      "Processing 37 of 4000\n",
      "Processing 38 of 4000\n",
      "Processing 39 of 4000\n",
      "Processing 40 of 4000\n",
      "Processing 41 of 4000\n",
      "Processing 42 of 4000\n",
      "Processing 43 of 4000\n",
      "Processing 44 of 4000\n",
      "Processing 45 of 4000\n",
      "Processing 46 of 4000\n",
      "Processing 47 of 4000\n",
      "Processing 48 of 4000\n",
      "Processing 49 of 4000\n",
      "Processing 50 of 4000\n",
      "Processing 51 of 4000\n",
      "Processing 52 of 4000\n",
      "Processing 53 of 4000\n",
      "Processing 54 of 4000\n",
      "Processing 55 of 4000\n",
      "Processing 56 of 4000\n",
      "Processing 57 of 4000\n",
      "Processing 58 of 4000\n",
      "Processing 59 of 4000\n",
      "Processing 60 of 4000\n",
      "Processing 61 of 4000\n",
      "Processing 62 of 4000\n",
      "Processing 63 of 4000\n",
      "Processing 64 of 4000\n",
      "Processing 65 of 4000\n",
      "Processing 66 of 4000\n",
      "Processing 67 of 4000\n",
      "Processing 68 of 4000\n",
      "Processing 69 of 4000\n",
      "Processing 70 of 4000\n",
      "Processing 71 of 4000\n",
      "Processing 72 of 4000\n",
      "Processing 73 of 4000\n",
      "Processing 74 of 4000\n",
      "Processing 75 of 4000\n",
      "Processing 76 of 4000\n",
      "Processing 77 of 4000\n",
      "Processing 78 of 4000\n",
      "Processing 79 of 4000\n",
      "Processing 80 of 4000\n",
      "Processing 81 of 4000\n",
      "Processing 82 of 4000\n",
      "Processing 83 of 4000\n",
      "Processing 84 of 4000\n",
      "Processing 85 of 4000\n",
      "Processing 86 of 4000\n",
      "Processing 87 of 4000\n",
      "Processing 88 of 4000\n",
      "Processing 89 of 4000\n",
      "Processing 90 of 4000\n",
      "Processing 91 of 4000\n",
      "Processing 92 of 4000\n",
      "Processing 93 of 4000\n",
      "Processing 94 of 4000\n",
      "Processing 95 of 4000\n",
      "Processing 96 of 4000\n",
      "Processing 97 of 4000\n",
      "Processing 98 of 4000\n",
      "Processing 99 of 4000\n",
      "Processing 100 of 4000\n",
      "Processing 101 of 4000\n",
      "Processing 102 of 4000\n",
      "Processing 103 of 4000\n",
      "Processing 104 of 4000\n",
      "Processing 105 of 4000\n",
      "Processing 106 of 4000\n",
      "Processing 107 of 4000\n",
      "Processing 108 of 4000\n",
      "Processing 109 of 4000\n",
      "Processing 110 of 4000\n",
      "Processing 111 of 4000\n",
      "Processing 112 of 4000\n",
      "Processing 113 of 4000\n",
      "Processing 114 of 4000\n",
      "Processing 115 of 4000\n",
      "Processing 116 of 4000\n",
      "Processing 117 of 4000\n",
      "Processing 118 of 4000\n",
      "Processing 119 of 4000\n",
      "Processing 120 of 4000\n",
      "Processing 121 of 4000\n",
      "Processing 122 of 4000\n",
      "Processing 123 of 4000\n",
      "Processing 124 of 4000\n",
      "Processing 125 of 4000\n",
      "Processing 126 of 4000\n",
      "Processing 127 of 4000\n",
      "Processing 128 of 4000\n",
      "Processing 129 of 4000\n",
      "Processing 130 of 4000\n",
      "Processing 131 of 4000\n",
      "Processing 132 of 4000\n",
      "Processing 133 of 4000\n",
      "Processing 134 of 4000\n",
      "Processing 135 of 4000\n",
      "Processing 136 of 4000\n",
      "Processing 137 of 4000\n",
      "Processing 138 of 4000\n",
      "Processing 139 of 4000\n",
      "Processing 140 of 4000\n",
      "Processing 141 of 4000\n",
      "Processing 142 of 4000\n",
      "Processing 143 of 4000\n",
      "Processing 144 of 4000\n",
      "Processing 145 of 4000\n",
      "Processing 146 of 4000\n",
      "Processing 147 of 4000\n",
      "Processing 148 of 4000\n",
      "Processing 149 of 4000\n",
      "Processing 150 of 4000\n",
      "Processing 151 of 4000\n",
      "Processing 152 of 4000\n",
      "Processing 153 of 4000\n",
      "Processing 154 of 4000\n",
      "Processing 155 of 4000\n",
      "Processing 156 of 4000\n",
      "Processing 157 of 4000\n",
      "Processing 158 of 4000\n",
      "Processing 159 of 4000\n",
      "Processing 160 of 4000\n",
      "Processing 161 of 4000\n",
      "Processing 162 of 4000\n",
      "Processing 163 of 4000\n",
      "Processing 164 of 4000\n",
      "Processing 165 of 4000\n",
      "Processing 166 of 4000\n",
      "Processing 167 of 4000\n",
      "Processing 168 of 4000\n",
      "Processing 169 of 4000\n",
      "Processing 170 of 4000\n",
      "Processing 171 of 4000\n",
      "Processing 172 of 4000\n",
      "Processing 173 of 4000\n",
      "Processing 174 of 4000\n",
      "Processing 175 of 4000\n",
      "Processing 176 of 4000\n",
      "Processing 177 of 4000\n",
      "Processing 178 of 4000\n",
      "Processing 179 of 4000\n",
      "Processing 180 of 4000\n",
      "Processing 181 of 4000\n",
      "Processing 182 of 4000\n",
      "Processing 183 of 4000\n",
      "Processing 184 of 4000\n",
      "Processing 185 of 4000\n",
      "Processing 186 of 4000\n",
      "Processing 187 of 4000\n",
      "Processing 188 of 4000\n",
      "Processing 189 of 4000\n",
      "Processing 190 of 4000\n",
      "Processing 191 of 4000\n",
      "Processing 192 of 4000\n",
      "Processing 193 of 4000\n",
      "Processing 194 of 4000\n",
      "Processing 195 of 4000\n",
      "Processing 196 of 4000\n",
      "Processing 197 of 4000\n",
      "Processing 198 of 4000\n",
      "Processing 199 of 4000\n",
      "Processing 200 of 4000\n",
      "Processing 201 of 4000\n",
      "Processing 202 of 4000\n",
      "Processing 203 of 4000\n",
      "Processing 204 of 4000\n",
      "Processing 205 of 4000\n",
      "Processing 206 of 4000\n",
      "Processing 207 of 4000\n",
      "Processing 208 of 4000\n",
      "Processing 209 of 4000\n",
      "Processing 210 of 4000\n",
      "Processing 211 of 4000\n",
      "Processing 212 of 4000\n",
      "Processing 213 of 4000\n",
      "Processing 214 of 4000\n",
      "Processing 215 of 4000\n",
      "Processing 216 of 4000\n",
      "Processing 217 of 4000\n",
      "Processing 218 of 4000\n",
      "Processing 219 of 4000\n",
      "Processing 220 of 4000\n",
      "Processing 221 of 4000\n",
      "Processing 222 of 4000\n",
      "Processing 223 of 4000\n",
      "Processing 224 of 4000\n",
      "Processing 225 of 4000\n",
      "Processing 226 of 4000\n",
      "Processing 227 of 4000\n",
      "Processing 228 of 4000\n",
      "Processing 229 of 4000\n",
      "Processing 230 of 4000\n",
      "Processing 231 of 4000\n",
      "Processing 232 of 4000\n",
      "Processing 233 of 4000\n",
      "Processing 234 of 4000\n",
      "Processing 235 of 4000\n",
      "Processing 236 of 4000\n",
      "Processing 237 of 4000\n",
      "Processing 238 of 4000\n",
      "Processing 239 of 4000\n",
      "Processing 240 of 4000\n",
      "Processing 241 of 4000\n",
      "Processing 242 of 4000\n",
      "Processing 243 of 4000\n",
      "Processing 244 of 4000\n",
      "Processing 245 of 4000\n",
      "Processing 246 of 4000\n",
      "Processing 247 of 4000\n",
      "Processing 248 of 4000\n",
      "Processing 249 of 4000\n",
      "Processing 250 of 4000\n",
      "Processing 251 of 4000\n",
      "Processing 252 of 4000\n",
      "Processing 253 of 4000\n",
      "Processing 254 of 4000\n",
      "Processing 255 of 4000\n",
      "Processing 256 of 4000\n",
      "Processing 257 of 4000\n",
      "Processing 258 of 4000\n",
      "Processing 259 of 4000\n",
      "Processing 260 of 4000\n",
      "Processing 261 of 4000\n",
      "Processing 262 of 4000\n",
      "Processing 263 of 4000\n",
      "Processing 264 of 4000\n",
      "Processing 265 of 4000\n",
      "Processing 266 of 4000\n",
      "Processing 267 of 4000\n",
      "Processing 268 of 4000\n",
      "Processing 269 of 4000\n",
      "Processing 270 of 4000\n",
      "Processing 271 of 4000\n",
      "Processing 272 of 4000\n",
      "Processing 273 of 4000\n",
      "Processing 274 of 4000\n",
      "Processing 275 of 4000\n",
      "Processing 276 of 4000\n",
      "Processing 277 of 4000\n",
      "Processing 278 of 4000\n",
      "Processing 279 of 4000\n",
      "Processing 280 of 4000\n",
      "Processing 281 of 4000\n",
      "Processing 282 of 4000\n",
      "Processing 283 of 4000\n",
      "Processing 284 of 4000\n",
      "Processing 285 of 4000\n",
      "Processing 286 of 4000\n",
      "Processing 287 of 4000\n",
      "Processing 288 of 4000\n",
      "Processing 289 of 4000\n",
      "Processing 290 of 4000\n",
      "Processing 291 of 4000\n",
      "Processing 292 of 4000\n",
      "Processing 293 of 4000\n",
      "Processing 294 of 4000\n",
      "Processing 295 of 4000\n",
      "Processing 296 of 4000\n",
      "Processing 297 of 4000\n",
      "Processing 298 of 4000\n",
      "Processing 299 of 4000\n",
      "Processing 300 of 4000\n",
      "Processing 301 of 4000\n",
      "Processing 302 of 4000\n",
      "Processing 303 of 4000\n",
      "Processing 304 of 4000\n",
      "Processing 305 of 4000\n",
      "Processing 306 of 4000\n",
      "Processing 307 of 4000\n",
      "Processing 308 of 4000\n",
      "Processing 309 of 4000\n",
      "Processing 310 of 4000\n",
      "Processing 311 of 4000\n",
      "Processing 312 of 4000\n",
      "Processing 313 of 4000\n",
      "Processing 314 of 4000\n",
      "Processing 315 of 4000\n",
      "Processing 316 of 4000\n",
      "Processing 317 of 4000\n",
      "Processing 318 of 4000\n",
      "Processing 319 of 4000\n",
      "Processing 320 of 4000\n",
      "Processing 321 of 4000\n",
      "Processing 322 of 4000\n",
      "Processing 323 of 4000\n",
      "Processing 324 of 4000\n",
      "Processing 325 of 4000\n",
      "Processing 326 of 4000\n",
      "Processing 327 of 4000\n",
      "Processing 328 of 4000\n",
      "Processing 329 of 4000\n",
      "Processing 330 of 4000\n",
      "Processing 331 of 4000\n",
      "Processing 332 of 4000\n",
      "Processing 333 of 4000\n",
      "Processing 334 of 4000\n",
      "Processing 335 of 4000\n",
      "Processing 336 of 4000\n",
      "Processing 337 of 4000\n",
      "Processing 338 of 4000\n",
      "Processing 339 of 4000\n",
      "Processing 340 of 4000\n",
      "Processing 341 of 4000\n",
      "Processing 342 of 4000\n",
      "Processing 343 of 4000\n",
      "Processing 344 of 4000\n",
      "Processing 345 of 4000\n",
      "Processing 346 of 4000\n",
      "Processing 347 of 4000\n",
      "Processing 348 of 4000\n",
      "Processing 349 of 4000\n",
      "Processing 350 of 4000\n",
      "Processing 351 of 4000\n",
      "Processing 352 of 4000\n",
      "Processing 353 of 4000\n",
      "Processing 354 of 4000\n",
      "Processing 355 of 4000\n",
      "Processing 356 of 4000\n",
      "Processing 357 of 4000\n",
      "Processing 358 of 4000\n",
      "Processing 359 of 4000\n",
      "Processing 360 of 4000\n",
      "Processing 361 of 4000\n",
      "Processing 362 of 4000\n",
      "Processing 363 of 4000\n",
      "Processing 364 of 4000\n",
      "Processing 365 of 4000\n",
      "Processing 366 of 4000\n",
      "Processing 367 of 4000\n",
      "Processing 368 of 4000\n",
      "Processing 369 of 4000\n",
      "Processing 370 of 4000\n",
      "Processing 371 of 4000\n",
      "Processing 372 of 4000\n",
      "Processing 373 of 4000\n",
      "Processing 374 of 4000\n",
      "Processing 375 of 4000\n",
      "Processing 376 of 4000\n",
      "Processing 377 of 4000\n",
      "Processing 378 of 4000\n",
      "Processing 379 of 4000\n",
      "Processing 380 of 4000\n",
      "Processing 381 of 4000\n",
      "Processing 382 of 4000\n",
      "Processing 383 of 4000\n",
      "Processing 384 of 4000\n",
      "Processing 385 of 4000\n",
      "Processing 386 of 4000\n",
      "Processing 387 of 4000\n",
      "Processing 388 of 4000\n",
      "Processing 389 of 4000\n",
      "Processing 390 of 4000\n",
      "Processing 391 of 4000\n",
      "Processing 392 of 4000\n",
      "Processing 393 of 4000\n",
      "Processing 394 of 4000\n",
      "Processing 395 of 4000\n",
      "Processing 396 of 4000\n",
      "Processing 397 of 4000\n",
      "Processing 398 of 4000\n",
      "Processing 399 of 4000\n",
      "Processing 400 of 4000\n",
      "Processing 401 of 4000\n",
      "Processing 402 of 4000\n",
      "Processing 403 of 4000\n",
      "Processing 404 of 4000\n",
      "Processing 405 of 4000\n",
      "Processing 406 of 4000\n",
      "Processing 407 of 4000\n",
      "Processing 408 of 4000\n",
      "Processing 409 of 4000\n",
      "Processing 410 of 4000\n",
      "Processing 411 of 4000\n",
      "Processing 412 of 4000\n",
      "Processing 413 of 4000\n",
      "Processing 414 of 4000\n",
      "Processing 415 of 4000\n",
      "Processing 416 of 4000\n",
      "Processing 417 of 4000\n",
      "Processing 418 of 4000\n",
      "Processing 419 of 4000\n",
      "Processing 420 of 4000\n",
      "Processing 421 of 4000\n",
      "Processing 422 of 4000\n",
      "Processing 423 of 4000\n",
      "Processing 424 of 4000\n",
      "Processing 425 of 4000\n",
      "Processing 426 of 4000\n",
      "Processing 427 of 4000\n",
      "Processing 428 of 4000\n",
      "Processing 429 of 4000\n",
      "Processing 430 of 4000\n",
      "Processing 431 of 4000\n",
      "Processing 432 of 4000\n",
      "Processing 433 of 4000\n",
      "Processing 434 of 4000\n",
      "Processing 435 of 4000\n",
      "Processing 436 of 4000\n",
      "Processing 437 of 4000\n",
      "Processing 438 of 4000\n",
      "Processing 439 of 4000\n",
      "Processing 440 of 4000\n",
      "Processing 441 of 4000\n",
      "Processing 442 of 4000\n",
      "Processing 443 of 4000\n",
      "Processing 444 of 4000\n",
      "Processing 445 of 4000\n",
      "Processing 446 of 4000\n",
      "Processing 447 of 4000\n",
      "Processing 448 of 4000\n",
      "Processing 449 of 4000\n",
      "Processing 450 of 4000\n",
      "Processing 451 of 4000\n",
      "Processing 452 of 4000\n",
      "Processing 453 of 4000\n",
      "Processing 454 of 4000\n",
      "Processing 455 of 4000\n",
      "Processing 456 of 4000\n",
      "Processing 457 of 4000\n",
      "Processing 458 of 4000\n",
      "Processing 459 of 4000\n",
      "Processing 460 of 4000\n",
      "Processing 461 of 4000\n",
      "Processing 462 of 4000\n",
      "Processing 463 of 4000\n",
      "Processing 464 of 4000\n",
      "Processing 465 of 4000\n",
      "Processing 466 of 4000\n",
      "Processing 467 of 4000\n",
      "Processing 468 of 4000\n",
      "Processing 469 of 4000\n",
      "Processing 470 of 4000\n",
      "Processing 471 of 4000\n",
      "Processing 472 of 4000\n",
      "Processing 473 of 4000\n",
      "Processing 474 of 4000\n",
      "Processing 475 of 4000\n",
      "Processing 476 of 4000\n",
      "Processing 477 of 4000\n",
      "Processing 478 of 4000\n",
      "Processing 479 of 4000\n",
      "Processing 480 of 4000\n",
      "Processing 481 of 4000\n",
      "Processing 482 of 4000\n",
      "Processing 483 of 4000\n",
      "Processing 484 of 4000\n",
      "Processing 485 of 4000\n",
      "Processing 486 of 4000\n",
      "Processing 487 of 4000\n",
      "Processing 488 of 4000\n",
      "Processing 489 of 4000\n",
      "Processing 490 of 4000\n",
      "Processing 491 of 4000\n",
      "Processing 492 of 4000\n",
      "Processing 493 of 4000\n",
      "Processing 494 of 4000\n",
      "Processing 495 of 4000\n",
      "Processing 496 of 4000\n",
      "Processing 497 of 4000\n",
      "Processing 498 of 4000\n",
      "Processing 499 of 4000\n",
      "Processing 500 of 4000\n",
      "Processing 501 of 4000\n",
      "Processing 502 of 4000\n",
      "Processing 503 of 4000\n",
      "Processing 504 of 4000\n",
      "Processing 505 of 4000\n",
      "Processing 506 of 4000\n",
      "Processing 507 of 4000\n",
      "Processing 508 of 4000\n",
      "Processing 509 of 4000\n",
      "Processing 510 of 4000\n",
      "Processing 511 of 4000\n",
      "Processing 512 of 4000\n",
      "Processing 513 of 4000\n",
      "Processing 514 of 4000\n",
      "Processing 515 of 4000\n",
      "Processing 516 of 4000\n",
      "Processing 517 of 4000\n",
      "Processing 518 of 4000\n",
      "Processing 519 of 4000\n",
      "Processing 520 of 4000\n",
      "Processing 521 of 4000\n",
      "Processing 522 of 4000\n",
      "Processing 523 of 4000\n",
      "Processing 524 of 4000\n",
      "Processing 525 of 4000\n",
      "Processing 526 of 4000\n",
      "Processing 527 of 4000\n",
      "Processing 528 of 4000\n",
      "Processing 529 of 4000\n",
      "Processing 530 of 4000\n",
      "Processing 531 of 4000\n",
      "Processing 532 of 4000\n",
      "Processing 533 of 4000\n",
      "Processing 534 of 4000\n",
      "Processing 535 of 4000\n",
      "Processing 536 of 4000\n",
      "Processing 537 of 4000\n",
      "Processing 538 of 4000\n",
      "Processing 539 of 4000\n",
      "Processing 540 of 4000\n",
      "Processing 541 of 4000\n",
      "Processing 542 of 4000\n",
      "Processing 543 of 4000\n",
      "Processing 544 of 4000\n",
      "Processing 545 of 4000\n",
      "Processing 546 of 4000\n",
      "Processing 547 of 4000\n",
      "Processing 548 of 4000\n",
      "Processing 549 of 4000\n",
      "Processing 550 of 4000\n",
      "Processing 551 of 4000\n",
      "Processing 552 of 4000\n",
      "Processing 553 of 4000\n",
      "Processing 554 of 4000\n",
      "Processing 555 of 4000\n",
      "Processing 556 of 4000\n",
      "Processing 557 of 4000\n",
      "Processing 558 of 4000\n",
      "Processing 559 of 4000\n",
      "Processing 560 of 4000\n",
      "Processing 561 of 4000\n",
      "Processing 562 of 4000\n",
      "Processing 563 of 4000\n",
      "Processing 564 of 4000\n",
      "Processing 565 of 4000\n",
      "Processing 566 of 4000\n",
      "Processing 567 of 4000\n",
      "Processing 568 of 4000\n",
      "Processing 569 of 4000\n",
      "Processing 570 of 4000\n",
      "Processing 571 of 4000\n",
      "Processing 572 of 4000\n",
      "Processing 573 of 4000\n",
      "Processing 574 of 4000\n",
      "Processing 575 of 4000\n",
      "Processing 576 of 4000\n",
      "Processing 577 of 4000\n",
      "Processing 578 of 4000\n",
      "Processing 579 of 4000\n",
      "Processing 580 of 4000\n",
      "Processing 581 of 4000\n",
      "Processing 582 of 4000\n",
      "Processing 583 of 4000\n",
      "Processing 584 of 4000\n",
      "Processing 585 of 4000\n",
      "Processing 586 of 4000\n",
      "Processing 587 of 4000\n",
      "Processing 588 of 4000\n",
      "Processing 589 of 4000\n",
      "Processing 590 of 4000\n",
      "Processing 591 of 4000\n",
      "Processing 592 of 4000\n",
      "Processing 593 of 4000\n",
      "Processing 594 of 4000\n",
      "Processing 595 of 4000\n",
      "Processing 596 of 4000\n",
      "Processing 597 of 4000\n",
      "Processing 598 of 4000\n",
      "Processing 599 of 4000\n",
      "Processing 600 of 4000\n",
      "Processing 601 of 4000\n",
      "Processing 602 of 4000\n",
      "Processing 603 of 4000\n",
      "Processing 604 of 4000\n",
      "Processing 605 of 4000\n",
      "Processing 606 of 4000\n",
      "Processing 607 of 4000\n",
      "Processing 608 of 4000\n",
      "Processing 609 of 4000\n",
      "Processing 610 of 4000\n",
      "Processing 611 of 4000\n",
      "Processing 612 of 4000\n",
      "Processing 613 of 4000\n",
      "Processing 614 of 4000\n",
      "Processing 615 of 4000\n",
      "Processing 616 of 4000\n",
      "Processing 617 of 4000\n",
      "Processing 618 of 4000\n",
      "Processing 619 of 4000\n",
      "Processing 620 of 4000\n",
      "Processing 621 of 4000\n",
      "Processing 622 of 4000\n",
      "Processing 623 of 4000\n",
      "Processing 624 of 4000\n",
      "Processing 625 of 4000\n",
      "Processing 626 of 4000\n",
      "Processing 627 of 4000\n",
      "Processing 628 of 4000\n",
      "Processing 629 of 4000\n",
      "Processing 630 of 4000\n",
      "Processing 631 of 4000\n",
      "Processing 632 of 4000\n",
      "Processing 633 of 4000\n",
      "Processing 634 of 4000\n",
      "Processing 635 of 4000\n",
      "Processing 636 of 4000\n",
      "Processing 637 of 4000\n",
      "Processing 638 of 4000\n",
      "Processing 639 of 4000\n",
      "Processing 640 of 4000\n",
      "Processing 641 of 4000\n",
      "Processing 642 of 4000\n",
      "Processing 643 of 4000\n",
      "Processing 644 of 4000\n",
      "Processing 645 of 4000\n",
      "Processing 646 of 4000\n",
      "Processing 647 of 4000\n",
      "Processing 648 of 4000\n",
      "Processing 649 of 4000\n",
      "Processing 650 of 4000\n",
      "Processing 651 of 4000\n",
      "Processing 652 of 4000\n",
      "Processing 653 of 4000\n",
      "Processing 654 of 4000\n",
      "Processing 655 of 4000\n",
      "Processing 656 of 4000\n",
      "Processing 657 of 4000\n",
      "Processing 658 of 4000\n",
      "Processing 659 of 4000\n",
      "Processing 660 of 4000\n",
      "Processing 661 of 4000\n",
      "Processing 662 of 4000\n",
      "Processing 663 of 4000\n",
      "Processing 664 of 4000\n",
      "Processing 665 of 4000\n",
      "Processing 666 of 4000\n",
      "Processing 667 of 4000\n",
      "Processing 668 of 4000\n",
      "Processing 669 of 4000\n",
      "Processing 670 of 4000\n",
      "Processing 671 of 4000\n",
      "Processing 672 of 4000\n",
      "Processing 673 of 4000\n",
      "Processing 674 of 4000\n",
      "Processing 675 of 4000\n",
      "Processing 676 of 4000\n",
      "Processing 677 of 4000\n",
      "Processing 678 of 4000\n",
      "Processing 679 of 4000\n",
      "Processing 680 of 4000\n",
      "Processing 681 of 4000\n",
      "Processing 682 of 4000\n",
      "Processing 683 of 4000\n",
      "Processing 684 of 4000\n",
      "Processing 685 of 4000\n",
      "Processing 686 of 4000\n",
      "Processing 687 of 4000\n",
      "Processing 688 of 4000\n",
      "Processing 689 of 4000\n",
      "Processing 690 of 4000\n",
      "Processing 691 of 4000\n",
      "Processing 692 of 4000\n",
      "Processing 693 of 4000\n",
      "Processing 694 of 4000\n",
      "Processing 695 of 4000\n",
      "Processing 696 of 4000\n",
      "Processing 697 of 4000\n",
      "Processing 698 of 4000\n",
      "Processing 699 of 4000\n",
      "Processing 700 of 4000\n",
      "Processing 701 of 4000\n",
      "Processing 702 of 4000\n",
      "Processing 703 of 4000\n",
      "Processing 704 of 4000\n",
      "Processing 705 of 4000\n",
      "Processing 706 of 4000\n",
      "Processing 707 of 4000\n",
      "Processing 708 of 4000\n",
      "Processing 709 of 4000\n",
      "Processing 710 of 4000\n",
      "Processing 711 of 4000\n",
      "Processing 712 of 4000\n",
      "Processing 713 of 4000\n",
      "Processing 714 of 4000\n",
      "Processing 715 of 4000\n",
      "Processing 716 of 4000\n",
      "Processing 717 of 4000\n",
      "Processing 718 of 4000\n",
      "Processing 719 of 4000\n",
      "Processing 720 of 4000\n",
      "Processing 721 of 4000\n",
      "Processing 722 of 4000\n",
      "Processing 723 of 4000\n",
      "Processing 724 of 4000\n",
      "Processing 725 of 4000\n",
      "Processing 726 of 4000\n",
      "Processing 727 of 4000\n",
      "Processing 728 of 4000\n",
      "Processing 729 of 4000\n",
      "Processing 730 of 4000\n",
      "Processing 731 of 4000\n",
      "Processing 732 of 4000\n",
      "Processing 733 of 4000\n",
      "Processing 734 of 4000\n",
      "Processing 735 of 4000\n",
      "Processing 736 of 4000\n",
      "Processing 737 of 4000\n",
      "Processing 738 of 4000\n",
      "Processing 739 of 4000\n",
      "Processing 740 of 4000\n",
      "Processing 741 of 4000\n",
      "Processing 742 of 4000\n",
      "Processing 743 of 4000\n",
      "Processing 744 of 4000\n",
      "Processing 745 of 4000\n",
      "Processing 746 of 4000\n",
      "Processing 747 of 4000\n",
      "Processing 748 of 4000\n",
      "Processing 749 of 4000\n",
      "Processing 750 of 4000\n",
      "Processing 751 of 4000\n",
      "Processing 752 of 4000\n",
      "Processing 753 of 4000\n",
      "Processing 754 of 4000\n",
      "Processing 755 of 4000\n",
      "Processing 756 of 4000\n",
      "Processing 757 of 4000\n",
      "Processing 758 of 4000\n",
      "Processing 759 of 4000\n",
      "Processing 760 of 4000\n",
      "Processing 761 of 4000\n",
      "Processing 762 of 4000\n",
      "Processing 763 of 4000\n",
      "Processing 764 of 4000\n",
      "Processing 765 of 4000\n",
      "Processing 766 of 4000\n",
      "Processing 767 of 4000\n",
      "Processing 768 of 4000\n",
      "Processing 769 of 4000\n",
      "Processing 770 of 4000\n",
      "Processing 771 of 4000\n",
      "Processing 772 of 4000\n",
      "Processing 773 of 4000\n",
      "Processing 774 of 4000\n",
      "Processing 775 of 4000\n",
      "Processing 776 of 4000\n",
      "Processing 777 of 4000\n",
      "Processing 778 of 4000\n",
      "Processing 779 of 4000\n",
      "Processing 780 of 4000\n",
      "Processing 781 of 4000\n",
      "Processing 782 of 4000\n",
      "Processing 783 of 4000\n",
      "Processing 784 of 4000\n",
      "Processing 785 of 4000\n",
      "Processing 786 of 4000\n",
      "Processing 787 of 4000\n",
      "Processing 788 of 4000\n",
      "Processing 789 of 4000\n",
      "Processing 790 of 4000\n",
      "Processing 791 of 4000\n",
      "Processing 792 of 4000\n",
      "Processing 793 of 4000\n",
      "Processing 794 of 4000\n",
      "Processing 795 of 4000\n",
      "Processing 796 of 4000\n",
      "Processing 797 of 4000\n",
      "Processing 798 of 4000\n",
      "Processing 799 of 4000\n",
      "Processing 800 of 4000\n",
      "Processing 801 of 4000\n",
      "Processing 802 of 4000\n",
      "Processing 803 of 4000\n",
      "Processing 804 of 4000\n",
      "Processing 805 of 4000\n",
      "Processing 806 of 4000\n",
      "Processing 807 of 4000\n",
      "Processing 808 of 4000\n",
      "Processing 809 of 4000\n",
      "Processing 810 of 4000\n",
      "Processing 811 of 4000\n",
      "Processing 812 of 4000\n",
      "Processing 813 of 4000\n",
      "Processing 814 of 4000\n",
      "Processing 815 of 4000\n",
      "Processing 816 of 4000\n",
      "Processing 817 of 4000\n",
      "Processing 818 of 4000\n",
      "Processing 819 of 4000\n",
      "Processing 820 of 4000\n",
      "Processing 821 of 4000\n",
      "Processing 822 of 4000\n",
      "Processing 823 of 4000\n",
      "Processing 824 of 4000\n",
      "Processing 825 of 4000\n",
      "Processing 826 of 4000\n",
      "Processing 827 of 4000\n",
      "Processing 828 of 4000\n",
      "Processing 829 of 4000\n",
      "Processing 830 of 4000\n",
      "Processing 831 of 4000\n",
      "Processing 832 of 4000\n",
      "Processing 833 of 4000\n",
      "Processing 834 of 4000\n",
      "Processing 835 of 4000\n",
      "Processing 836 of 4000\n",
      "Processing 837 of 4000\n",
      "Processing 838 of 4000\n",
      "Processing 839 of 4000\n",
      "Processing 840 of 4000\n",
      "Processing 841 of 4000\n",
      "Processing 842 of 4000\n",
      "Processing 843 of 4000\n",
      "Processing 844 of 4000\n",
      "Processing 845 of 4000\n",
      "Processing 846 of 4000\n",
      "Processing 847 of 4000\n",
      "Processing 848 of 4000\n",
      "Processing 849 of 4000\n",
      "Processing 850 of 4000\n",
      "Processing 851 of 4000\n",
      "Processing 852 of 4000\n",
      "Processing 853 of 4000\n",
      "Processing 854 of 4000\n",
      "Processing 855 of 4000\n",
      "Processing 856 of 4000\n",
      "Processing 857 of 4000\n",
      "Processing 858 of 4000\n",
      "Processing 859 of 4000\n",
      "Processing 860 of 4000\n",
      "Processing 861 of 4000\n",
      "Processing 862 of 4000\n",
      "Processing 863 of 4000\n",
      "Processing 864 of 4000\n",
      "Processing 865 of 4000\n",
      "Processing 866 of 4000\n",
      "Processing 867 of 4000\n",
      "Processing 868 of 4000\n",
      "Processing 869 of 4000\n",
      "Processing 870 of 4000\n",
      "Processing 871 of 4000\n",
      "Processing 872 of 4000\n",
      "Processing 873 of 4000\n",
      "Processing 874 of 4000\n",
      "Processing 875 of 4000\n",
      "Processing 876 of 4000\n",
      "Processing 877 of 4000\n",
      "Processing 878 of 4000\n",
      "Processing 879 of 4000\n",
      "Processing 880 of 4000\n",
      "Processing 881 of 4000\n",
      "Processing 882 of 4000\n",
      "Processing 883 of 4000\n",
      "Processing 884 of 4000\n",
      "Processing 885 of 4000\n",
      "Processing 886 of 4000\n",
      "Processing 887 of 4000\n",
      "Processing 888 of 4000\n",
      "Processing 889 of 4000\n",
      "Processing 890 of 4000\n",
      "Processing 891 of 4000\n",
      "Processing 892 of 4000\n",
      "Processing 893 of 4000\n",
      "Processing 894 of 4000\n",
      "Processing 895 of 4000\n",
      "Processing 896 of 4000\n",
      "Processing 897 of 4000\n",
      "Processing 898 of 4000\n",
      "Processing 899 of 4000\n",
      "Processing 900 of 4000\n",
      "Processing 901 of 4000\n",
      "Processing 902 of 4000\n",
      "Processing 903 of 4000\n",
      "Processing 904 of 4000\n",
      "Processing 905 of 4000\n",
      "Processing 906 of 4000\n",
      "Processing 907 of 4000\n",
      "Processing 908 of 4000\n",
      "Processing 909 of 4000\n",
      "Processing 910 of 4000\n",
      "Processing 911 of 4000\n",
      "Processing 912 of 4000\n",
      "Processing 913 of 4000\n",
      "Processing 914 of 4000\n",
      "Processing 915 of 4000\n",
      "Processing 916 of 4000\n",
      "Processing 917 of 4000\n",
      "Processing 918 of 4000\n",
      "Processing 919 of 4000\n",
      "Processing 920 of 4000\n",
      "Processing 921 of 4000\n",
      "Processing 922 of 4000\n",
      "Processing 923 of 4000\n",
      "Processing 924 of 4000\n",
      "Processing 925 of 4000\n",
      "Processing 926 of 4000\n",
      "Processing 927 of 4000\n",
      "Processing 928 of 4000\n",
      "Processing 929 of 4000\n",
      "Processing 930 of 4000\n",
      "Processing 931 of 4000\n",
      "Processing 932 of 4000\n",
      "Processing 933 of 4000\n",
      "Processing 934 of 4000\n",
      "Processing 935 of 4000\n",
      "Processing 936 of 4000\n",
      "Processing 937 of 4000\n",
      "Processing 938 of 4000\n",
      "Processing 939 of 4000\n",
      "Processing 940 of 4000\n",
      "Processing 941 of 4000\n",
      "Processing 942 of 4000\n",
      "Processing 943 of 4000\n",
      "Processing 944 of 4000\n",
      "Processing 945 of 4000\n",
      "Processing 946 of 4000\n",
      "Processing 947 of 4000\n",
      "Processing 948 of 4000\n",
      "Processing 949 of 4000\n",
      "Processing 950 of 4000\n",
      "Processing 951 of 4000\n",
      "Processing 952 of 4000\n",
      "Processing 953 of 4000\n",
      "Processing 954 of 4000\n",
      "Processing 955 of 4000\n",
      "Processing 956 of 4000\n",
      "Processing 957 of 4000\n",
      "Processing 958 of 4000\n",
      "Processing 959 of 4000\n",
      "Processing 960 of 4000\n",
      "Processing 961 of 4000\n",
      "Processing 962 of 4000\n",
      "Processing 963 of 4000\n",
      "Processing 964 of 4000\n",
      "Processing 965 of 4000\n",
      "Processing 966 of 4000\n",
      "Processing 967 of 4000\n",
      "Processing 968 of 4000\n",
      "Processing 969 of 4000\n",
      "Processing 970 of 4000\n",
      "Processing 971 of 4000\n",
      "Processing 972 of 4000\n",
      "Processing 973 of 4000\n",
      "Processing 974 of 4000\n",
      "Processing 975 of 4000\n",
      "Processing 976 of 4000\n",
      "Processing 977 of 4000\n",
      "Processing 978 of 4000\n",
      "Processing 979 of 4000\n",
      "Processing 980 of 4000\n",
      "Processing 981 of 4000\n",
      "Processing 982 of 4000\n",
      "Processing 983 of 4000\n",
      "Processing 984 of 4000\n",
      "Processing 985 of 4000\n",
      "Processing 986 of 4000\n",
      "Processing 987 of 4000\n",
      "Processing 988 of 4000\n",
      "Processing 989 of 4000\n",
      "Processing 990 of 4000\n",
      "Processing 991 of 4000\n",
      "Processing 992 of 4000\n",
      "Processing 993 of 4000\n",
      "Processing 994 of 4000\n",
      "Processing 995 of 4000\n",
      "Processing 996 of 4000\n",
      "Processing 997 of 4000\n",
      "Processing 998 of 4000\n",
      "Processing 999 of 4000\n",
      "Processing 1000 of 4000\n",
      "Processing 1001 of 4000\n",
      "Processing 1002 of 4000\n",
      "Processing 1003 of 4000\n",
      "Processing 1004 of 4000\n",
      "Processing 1005 of 4000\n",
      "Processing 1006 of 4000\n",
      "Processing 1007 of 4000\n",
      "Processing 1008 of 4000\n",
      "Processing 1009 of 4000\n",
      "Processing 1010 of 4000\n",
      "Processing 1011 of 4000\n",
      "Processing 1012 of 4000\n",
      "Processing 1013 of 4000\n",
      "Processing 1014 of 4000\n",
      "Processing 1015 of 4000\n",
      "Processing 1016 of 4000\n",
      "Processing 1017 of 4000\n",
      "Processing 1018 of 4000\n",
      "Processing 1019 of 4000\n",
      "Processing 1020 of 4000\n",
      "Processing 1021 of 4000\n",
      "Processing 1022 of 4000\n",
      "Processing 1023 of 4000\n",
      "Processing 1024 of 4000\n",
      "Processing 1025 of 4000\n",
      "Processing 1026 of 4000\n",
      "Processing 1027 of 4000\n",
      "Processing 1028 of 4000\n",
      "Processing 1029 of 4000\n",
      "Processing 1030 of 4000\n",
      "Processing 1031 of 4000\n",
      "Processing 1032 of 4000\n",
      "Processing 1033 of 4000\n",
      "Processing 1034 of 4000\n",
      "Processing 1035 of 4000\n",
      "Processing 1036 of 4000\n",
      "Processing 1037 of 4000\n",
      "Processing 1038 of 4000\n",
      "Processing 1039 of 4000\n",
      "Processing 1040 of 4000\n",
      "Processing 1041 of 4000\n",
      "Processing 1042 of 4000\n",
      "Processing 1043 of 4000\n",
      "Processing 1044 of 4000\n",
      "Processing 1045 of 4000\n",
      "Processing 1046 of 4000\n",
      "Processing 1047 of 4000\n",
      "Processing 1048 of 4000\n",
      "Processing 1049 of 4000\n",
      "Processing 1050 of 4000\n",
      "Processing 1051 of 4000\n",
      "Processing 1052 of 4000\n",
      "Processing 1053 of 4000\n",
      "Processing 1054 of 4000\n",
      "Processing 1055 of 4000\n",
      "Processing 1056 of 4000\n",
      "Processing 1057 of 4000\n",
      "Processing 1058 of 4000\n",
      "Processing 1059 of 4000\n",
      "Processing 1060 of 4000\n",
      "Processing 1061 of 4000\n",
      "Processing 1062 of 4000\n",
      "Processing 1063 of 4000\n",
      "Processing 1064 of 4000\n",
      "Processing 1065 of 4000\n",
      "Processing 1066 of 4000\n",
      "Processing 1067 of 4000\n",
      "Processing 1068 of 4000\n",
      "Processing 1069 of 4000\n",
      "Processing 1070 of 4000\n",
      "Processing 1071 of 4000\n",
      "Processing 1072 of 4000\n",
      "Processing 1073 of 4000\n",
      "Processing 1074 of 4000\n",
      "Processing 1075 of 4000\n",
      "Processing 1076 of 4000\n",
      "Processing 1077 of 4000\n",
      "Processing 1078 of 4000\n",
      "Processing 1079 of 4000\n",
      "Processing 1080 of 4000\n",
      "Processing 1081 of 4000\n",
      "Processing 1082 of 4000\n",
      "Processing 1083 of 4000\n",
      "Processing 1084 of 4000\n",
      "Processing 1085 of 4000\n",
      "Processing 1086 of 4000\n",
      "Processing 1087 of 4000\n",
      "Processing 1088 of 4000\n",
      "Processing 1089 of 4000\n",
      "Processing 1090 of 4000\n",
      "Processing 1091 of 4000\n",
      "Processing 1092 of 4000\n",
      "Processing 1093 of 4000\n",
      "Processing 1094 of 4000\n",
      "Processing 1095 of 4000\n",
      "Processing 1096 of 4000\n",
      "Processing 1097 of 4000\n",
      "Processing 1098 of 4000\n",
      "Processing 1099 of 4000\n",
      "Processing 1100 of 4000\n",
      "Processing 1101 of 4000\n",
      "Processing 1102 of 4000\n",
      "Processing 1103 of 4000\n",
      "Processing 1104 of 4000\n",
      "Processing 1105 of 4000\n",
      "Processing 1106 of 4000\n",
      "Processing 1107 of 4000\n",
      "Processing 1108 of 4000\n",
      "Processing 1109 of 4000\n",
      "Processing 1110 of 4000\n",
      "Processing 1111 of 4000\n",
      "Processing 1112 of 4000\n",
      "Processing 1113 of 4000\n",
      "Processing 1114 of 4000\n",
      "Processing 1115 of 4000\n",
      "Processing 1116 of 4000\n",
      "Processing 1117 of 4000\n",
      "Processing 1118 of 4000\n",
      "Processing 1119 of 4000\n",
      "Processing 1120 of 4000\n",
      "Processing 1121 of 4000\n",
      "Processing 1122 of 4000\n",
      "Processing 1123 of 4000\n",
      "Processing 1124 of 4000\n",
      "Processing 1125 of 4000\n",
      "Processing 1126 of 4000\n",
      "Processing 1127 of 4000\n",
      "Processing 1128 of 4000\n",
      "Processing 1129 of 4000\n",
      "Processing 1130 of 4000\n",
      "Processing 1131 of 4000\n",
      "Processing 1132 of 4000\n",
      "Processing 1133 of 4000\n",
      "Processing 1134 of 4000\n",
      "Processing 1135 of 4000\n",
      "Processing 1136 of 4000\n",
      "Processing 1137 of 4000\n",
      "Processing 1138 of 4000\n",
      "Processing 1139 of 4000\n",
      "Processing 1140 of 4000\n",
      "Processing 1141 of 4000\n",
      "Processing 1142 of 4000\n",
      "Processing 1143 of 4000\n",
      "Processing 1144 of 4000\n",
      "Processing 1145 of 4000\n",
      "Processing 1146 of 4000\n",
      "Processing 1147 of 4000\n",
      "Processing 1148 of 4000\n",
      "Processing 1149 of 4000\n",
      "Processing 1150 of 4000\n",
      "Processing 1151 of 4000\n",
      "Processing 1152 of 4000\n",
      "Processing 1153 of 4000\n",
      "Processing 1154 of 4000\n",
      "Processing 1155 of 4000\n",
      "Processing 1156 of 4000\n",
      "Processing 1157 of 4000\n",
      "Processing 1158 of 4000\n",
      "Processing 1159 of 4000\n",
      "Processing 1160 of 4000\n",
      "Processing 1161 of 4000\n",
      "Processing 1162 of 4000\n",
      "Processing 1163 of 4000\n",
      "Processing 1164 of 4000\n",
      "Processing 1165 of 4000\n",
      "Processing 1166 of 4000\n",
      "Processing 1167 of 4000\n",
      "Processing 1168 of 4000\n",
      "Processing 1169 of 4000\n",
      "Processing 1170 of 4000\n",
      "Processing 1171 of 4000\n",
      "Processing 1172 of 4000\n",
      "Processing 1173 of 4000\n",
      "Processing 1174 of 4000\n",
      "Processing 1175 of 4000\n",
      "Processing 1176 of 4000\n",
      "Processing 1177 of 4000\n",
      "Processing 1178 of 4000\n",
      "Processing 1179 of 4000\n",
      "Processing 1180 of 4000\n",
      "Processing 1181 of 4000\n",
      "Processing 1182 of 4000\n",
      "Processing 1183 of 4000\n",
      "Processing 1184 of 4000\n",
      "Processing 1185 of 4000\n",
      "Processing 1186 of 4000\n",
      "Processing 1187 of 4000\n",
      "Processing 1188 of 4000\n",
      "Processing 1189 of 4000\n",
      "Processing 1190 of 4000\n",
      "Processing 1191 of 4000\n",
      "Processing 1192 of 4000\n",
      "Processing 1193 of 4000\n",
      "Processing 1194 of 4000\n",
      "Processing 1195 of 4000\n",
      "Processing 1196 of 4000\n",
      "Processing 1197 of 4000\n",
      "Processing 1198 of 4000\n",
      "Processing 1199 of 4000\n",
      "Processing 1200 of 4000\n",
      "Processing 1201 of 4000\n",
      "Processing 1202 of 4000\n",
      "Processing 1203 of 4000\n",
      "Processing 1204 of 4000\n",
      "Processing 1205 of 4000\n",
      "Processing 1206 of 4000\n",
      "Processing 1207 of 4000\n",
      "Processing 1208 of 4000\n",
      "Processing 1209 of 4000\n",
      "Processing 1210 of 4000\n",
      "Processing 1211 of 4000\n",
      "Processing 1212 of 4000\n",
      "Processing 1213 of 4000\n",
      "Processing 1214 of 4000\n",
      "Processing 1215 of 4000\n",
      "Processing 1216 of 4000\n",
      "Processing 1217 of 4000\n",
      "Processing 1218 of 4000\n",
      "Processing 1219 of 4000\n",
      "Processing 1220 of 4000\n",
      "Processing 1221 of 4000\n",
      "Processing 1222 of 4000\n",
      "Processing 1223 of 4000\n",
      "Processing 1224 of 4000\n",
      "Processing 1225 of 4000\n",
      "Processing 1226 of 4000\n",
      "Processing 1227 of 4000\n",
      "Processing 1228 of 4000\n",
      "Processing 1229 of 4000\n",
      "Processing 1230 of 4000\n",
      "Processing 1231 of 4000\n",
      "Processing 1232 of 4000\n",
      "Processing 1233 of 4000\n",
      "Processing 1234 of 4000\n",
      "Processing 1235 of 4000\n",
      "Processing 1236 of 4000\n",
      "Processing 1237 of 4000\n",
      "Processing 1238 of 4000\n",
      "Processing 1239 of 4000\n",
      "Processing 1240 of 4000\n",
      "Processing 1241 of 4000\n",
      "Processing 1242 of 4000\n",
      "Processing 1243 of 4000\n",
      "Processing 1244 of 4000\n",
      "Processing 1245 of 4000\n",
      "Processing 1246 of 4000\n",
      "Processing 1247 of 4000\n",
      "Processing 1248 of 4000\n",
      "Processing 1249 of 4000\n",
      "Processing 1250 of 4000\n",
      "Processing 1251 of 4000\n",
      "Processing 1252 of 4000\n",
      "Processing 1253 of 4000\n",
      "Processing 1254 of 4000\n",
      "Processing 1255 of 4000\n",
      "Processing 1256 of 4000\n",
      "Processing 1257 of 4000\n",
      "Processing 1258 of 4000\n",
      "Processing 1259 of 4000\n",
      "Processing 1260 of 4000\n",
      "Processing 1261 of 4000\n",
      "Processing 1262 of 4000\n",
      "Processing 1263 of 4000\n",
      "Processing 1264 of 4000\n",
      "Processing 1265 of 4000\n",
      "Processing 1266 of 4000\n",
      "Processing 1267 of 4000\n",
      "Processing 1268 of 4000\n",
      "Processing 1269 of 4000\n",
      "Processing 1270 of 4000\n",
      "Processing 1271 of 4000\n",
      "Processing 1272 of 4000\n",
      "Processing 1273 of 4000\n",
      "Processing 1274 of 4000\n",
      "Processing 1275 of 4000\n",
      "Processing 1276 of 4000\n",
      "Processing 1277 of 4000\n",
      "Processing 1278 of 4000\n",
      "Processing 1279 of 4000\n",
      "Processing 1280 of 4000\n",
      "Processing 1281 of 4000\n",
      "Processing 1282 of 4000\n",
      "Processing 1283 of 4000\n",
      "Processing 1284 of 4000\n",
      "Processing 1285 of 4000\n",
      "Processing 1286 of 4000\n",
      "Processing 1287 of 4000\n",
      "Processing 1288 of 4000\n",
      "Processing 1289 of 4000\n",
      "Processing 1290 of 4000\n",
      "Processing 1291 of 4000\n",
      "Processing 1292 of 4000\n",
      "Processing 1293 of 4000\n",
      "Processing 1294 of 4000\n",
      "Processing 1295 of 4000\n",
      "Processing 1296 of 4000\n",
      "Processing 1297 of 4000\n",
      "Processing 1298 of 4000\n",
      "Processing 1299 of 4000\n",
      "Processing 1300 of 4000\n",
      "Processing 1301 of 4000\n",
      "Processing 1302 of 4000\n",
      "Processing 1303 of 4000\n",
      "Processing 1304 of 4000\n",
      "Processing 1305 of 4000\n",
      "Processing 1306 of 4000\n",
      "Processing 1307 of 4000\n",
      "Processing 1308 of 4000\n",
      "Processing 1309 of 4000\n",
      "Processing 1310 of 4000\n",
      "Processing 1311 of 4000\n",
      "Processing 1312 of 4000\n",
      "Processing 1313 of 4000\n",
      "Processing 1314 of 4000\n",
      "Processing 1315 of 4000\n",
      "Processing 1316 of 4000\n",
      "Processing 1317 of 4000\n",
      "Processing 1318 of 4000\n",
      "Processing 1319 of 4000\n",
      "Processing 1320 of 4000\n",
      "Processing 1321 of 4000\n",
      "Processing 1322 of 4000\n",
      "Processing 1323 of 4000\n",
      "Processing 1324 of 4000\n",
      "Processing 1325 of 4000\n",
      "Processing 1326 of 4000\n",
      "Processing 1327 of 4000\n",
      "Processing 1328 of 4000\n",
      "Processing 1329 of 4000\n",
      "Processing 1330 of 4000\n",
      "Processing 1331 of 4000\n",
      "Processing 1332 of 4000\n",
      "Processing 1333 of 4000\n",
      "Processing 1334 of 4000\n",
      "Processing 1335 of 4000\n",
      "Processing 1336 of 4000\n",
      "Processing 1337 of 4000\n",
      "Processing 1338 of 4000\n",
      "Processing 1339 of 4000\n",
      "Processing 1340 of 4000\n",
      "Processing 1341 of 4000\n",
      "Processing 1342 of 4000\n",
      "Processing 1343 of 4000\n",
      "Processing 1344 of 4000\n",
      "Processing 1345 of 4000\n",
      "Processing 1346 of 4000\n",
      "Processing 1347 of 4000\n",
      "Processing 1348 of 4000\n",
      "Processing 1349 of 4000\n",
      "Processing 1350 of 4000\n",
      "Processing 1351 of 4000\n",
      "Processing 1352 of 4000\n",
      "Processing 1353 of 4000\n",
      "Processing 1354 of 4000\n",
      "Processing 1355 of 4000\n",
      "Processing 1356 of 4000\n",
      "Processing 1357 of 4000\n",
      "Processing 1358 of 4000\n",
      "Processing 1359 of 4000\n",
      "Processing 1360 of 4000\n",
      "Processing 1361 of 4000\n",
      "Processing 1362 of 4000\n",
      "Processing 1363 of 4000\n",
      "Processing 1364 of 4000\n",
      "Processing 1365 of 4000\n",
      "Processing 1366 of 4000\n",
      "Processing 1367 of 4000\n",
      "Processing 1368 of 4000\n",
      "Processing 1369 of 4000\n",
      "Processing 1370 of 4000\n",
      "Processing 1371 of 4000\n",
      "Processing 1372 of 4000\n",
      "Processing 1373 of 4000\n",
      "Processing 1374 of 4000\n",
      "Processing 1375 of 4000\n",
      "Processing 1376 of 4000\n",
      "Processing 1377 of 4000\n",
      "Processing 1378 of 4000\n",
      "Processing 1379 of 4000\n",
      "Processing 1380 of 4000\n",
      "Processing 1381 of 4000\n",
      "Processing 1382 of 4000\n",
      "Processing 1383 of 4000\n",
      "Processing 1384 of 4000\n",
      "Processing 1385 of 4000\n",
      "Processing 1386 of 4000\n",
      "Processing 1387 of 4000\n",
      "Processing 1388 of 4000\n",
      "Processing 1389 of 4000\n",
      "Processing 1390 of 4000\n",
      "Processing 1391 of 4000\n",
      "Processing 1392 of 4000\n",
      "Processing 1393 of 4000\n",
      "Processing 1394 of 4000\n",
      "Processing 1395 of 4000\n",
      "Processing 1396 of 4000\n",
      "Processing 1397 of 4000\n",
      "Processing 1398 of 4000\n",
      "Processing 1399 of 4000\n",
      "Processing 1400 of 4000\n",
      "Processing 1401 of 4000\n",
      "Processing 1402 of 4000\n",
      "Processing 1403 of 4000\n",
      "Processing 1404 of 4000\n",
      "Processing 1405 of 4000\n",
      "Processing 1406 of 4000\n",
      "Processing 1407 of 4000\n",
      "Processing 1408 of 4000\n",
      "Processing 1409 of 4000\n",
      "Processing 1410 of 4000\n",
      "Processing 1411 of 4000\n",
      "Processing 1412 of 4000\n",
      "Processing 1413 of 4000\n",
      "Processing 1414 of 4000\n",
      "Processing 1415 of 4000\n",
      "Processing 1416 of 4000\n",
      "Processing 1417 of 4000\n",
      "Processing 1418 of 4000\n",
      "Processing 1419 of 4000\n",
      "Processing 1420 of 4000\n",
      "Processing 1421 of 4000\n",
      "Processing 1422 of 4000\n",
      "Processing 1423 of 4000\n",
      "Processing 1424 of 4000\n",
      "Processing 1425 of 4000\n",
      "Processing 1426 of 4000\n",
      "Processing 1427 of 4000\n",
      "Processing 1428 of 4000\n",
      "Processing 1429 of 4000\n",
      "Processing 1430 of 4000\n",
      "Processing 1431 of 4000\n",
      "Processing 1432 of 4000\n",
      "Processing 1433 of 4000\n",
      "Processing 1434 of 4000\n",
      "Processing 1435 of 4000\n",
      "Processing 1436 of 4000\n",
      "Processing 1437 of 4000\n",
      "Processing 1438 of 4000\n",
      "Processing 1439 of 4000\n",
      "Processing 1440 of 4000\n",
      "Processing 1441 of 4000\n",
      "Processing 1442 of 4000\n",
      "Processing 1443 of 4000\n",
      "Processing 1444 of 4000\n",
      "Processing 1445 of 4000\n",
      "Processing 1446 of 4000\n",
      "Processing 1447 of 4000\n",
      "Processing 1448 of 4000\n",
      "Processing 1449 of 4000\n",
      "Processing 1450 of 4000\n",
      "Processing 1451 of 4000\n",
      "Processing 1452 of 4000\n",
      "Processing 1453 of 4000\n",
      "Processing 1454 of 4000\n",
      "Processing 1455 of 4000\n",
      "Processing 1456 of 4000\n",
      "Processing 1457 of 4000\n",
      "Processing 1458 of 4000\n",
      "Processing 1459 of 4000\n",
      "Processing 1460 of 4000\n",
      "Processing 1461 of 4000\n",
      "Processing 1462 of 4000\n",
      "Processing 1463 of 4000\n",
      "Processing 1464 of 4000\n",
      "Processing 1465 of 4000\n",
      "Processing 1466 of 4000\n",
      "Processing 1467 of 4000\n",
      "Processing 1468 of 4000\n",
      "Processing 1469 of 4000\n",
      "Processing 1470 of 4000\n",
      "Processing 1471 of 4000\n",
      "Processing 1472 of 4000\n",
      "Processing 1473 of 4000\n",
      "Processing 1474 of 4000\n",
      "Processing 1475 of 4000\n",
      "Processing 1476 of 4000\n",
      "Processing 1477 of 4000\n",
      "Processing 1478 of 4000\n",
      "Processing 1479 of 4000\n",
      "Processing 1480 of 4000\n",
      "Processing 1481 of 4000\n",
      "Processing 1482 of 4000\n",
      "Processing 1483 of 4000\n",
      "Processing 1484 of 4000\n",
      "Processing 1485 of 4000\n",
      "Processing 1486 of 4000\n",
      "Processing 1487 of 4000\n",
      "Processing 1488 of 4000\n",
      "Processing 1489 of 4000\n",
      "Processing 1490 of 4000\n",
      "Processing 1491 of 4000\n",
      "Processing 1492 of 4000\n",
      "Processing 1493 of 4000\n",
      "Processing 1494 of 4000\n",
      "Processing 1495 of 4000\n",
      "Processing 1496 of 4000\n",
      "Processing 1497 of 4000\n",
      "Processing 1498 of 4000\n",
      "Processing 1499 of 4000\n",
      "Processing 1500 of 4000\n",
      "Processing 1501 of 4000\n",
      "Processing 1502 of 4000\n",
      "Processing 1503 of 4000\n",
      "Processing 1504 of 4000\n",
      "Processing 1505 of 4000\n",
      "Processing 1506 of 4000\n",
      "Processing 1507 of 4000\n",
      "Processing 1508 of 4000\n",
      "Processing 1509 of 4000\n",
      "Processing 1510 of 4000\n",
      "Processing 1511 of 4000\n",
      "Processing 1512 of 4000\n",
      "Processing 1513 of 4000\n",
      "Processing 1514 of 4000\n",
      "Processing 1515 of 4000\n",
      "Processing 1516 of 4000\n",
      "Processing 1517 of 4000\n",
      "Processing 1518 of 4000\n",
      "Processing 1519 of 4000\n",
      "Processing 1520 of 4000\n",
      "Processing 1521 of 4000\n",
      "Processing 1522 of 4000\n",
      "Processing 1523 of 4000\n",
      "Processing 1524 of 4000\n",
      "Processing 1525 of 4000\n",
      "Processing 1526 of 4000\n",
      "Processing 1527 of 4000\n",
      "Processing 1528 of 4000\n",
      "Processing 1529 of 4000\n",
      "Processing 1530 of 4000\n",
      "Processing 1531 of 4000\n",
      "Processing 1532 of 4000\n",
      "Processing 1533 of 4000\n",
      "Processing 1534 of 4000\n",
      "Processing 1535 of 4000\n",
      "Processing 1536 of 4000\n",
      "Processing 1537 of 4000\n",
      "Processing 1538 of 4000\n",
      "Processing 1539 of 4000\n",
      "Processing 1540 of 4000\n",
      "Processing 1541 of 4000\n",
      "Processing 1542 of 4000\n",
      "Processing 1543 of 4000\n",
      "Processing 1544 of 4000\n",
      "Processing 1545 of 4000\n",
      "Processing 1546 of 4000\n",
      "Processing 1547 of 4000\n",
      "Processing 1548 of 4000\n",
      "Processing 1549 of 4000\n",
      "Processing 1550 of 4000\n",
      "Processing 1551 of 4000\n",
      "Processing 1552 of 4000\n",
      "Processing 1553 of 4000\n",
      "Processing 1554 of 4000\n",
      "Processing 1555 of 4000\n",
      "Processing 1556 of 4000\n",
      "Processing 1557 of 4000\n",
      "Processing 1558 of 4000\n",
      "Processing 1559 of 4000\n",
      "Processing 1560 of 4000\n",
      "Processing 1561 of 4000\n",
      "Processing 1562 of 4000\n",
      "Processing 1563 of 4000\n",
      "Processing 1564 of 4000\n",
      "Processing 1565 of 4000\n",
      "Processing 1566 of 4000\n",
      "Processing 1567 of 4000\n",
      "Processing 1568 of 4000\n",
      "Processing 1569 of 4000\n",
      "Processing 1570 of 4000\n",
      "Processing 1571 of 4000\n",
      "Processing 1572 of 4000\n",
      "Processing 1573 of 4000\n",
      "Processing 1574 of 4000\n",
      "Processing 1575 of 4000\n",
      "Processing 1576 of 4000\n",
      "Processing 1577 of 4000\n",
      "Processing 1578 of 4000\n",
      "Processing 1579 of 4000\n",
      "Processing 1580 of 4000\n",
      "Processing 1581 of 4000\n",
      "Processing 1582 of 4000\n",
      "Processing 1583 of 4000\n",
      "Processing 1584 of 4000\n",
      "Processing 1585 of 4000\n",
      "Processing 1586 of 4000\n",
      "Processing 1587 of 4000\n",
      "Processing 1588 of 4000\n",
      "Processing 1589 of 4000\n",
      "Processing 1590 of 4000\n",
      "Processing 1591 of 4000\n",
      "Processing 1592 of 4000\n",
      "Processing 1593 of 4000\n",
      "Processing 1594 of 4000\n",
      "Processing 1595 of 4000\n",
      "Processing 1596 of 4000\n",
      "Processing 1597 of 4000\n",
      "Processing 1598 of 4000\n",
      "Processing 1599 of 4000\n",
      "Processing 1600 of 4000\n",
      "Processing 1601 of 4000\n",
      "Processing 1602 of 4000\n",
      "Processing 1603 of 4000\n",
      "Processing 1604 of 4000\n",
      "Processing 1605 of 4000\n",
      "Processing 1606 of 4000\n",
      "Processing 1607 of 4000\n",
      "Processing 1608 of 4000\n",
      "Processing 1609 of 4000\n",
      "Processing 1610 of 4000\n",
      "Processing 1611 of 4000\n",
      "Processing 1612 of 4000\n",
      "Processing 1613 of 4000\n",
      "Processing 1614 of 4000\n",
      "Processing 1615 of 4000\n",
      "Processing 1616 of 4000\n",
      "Processing 1617 of 4000\n",
      "Processing 1618 of 4000\n",
      "Processing 1619 of 4000\n",
      "Processing 1620 of 4000\n",
      "Processing 1621 of 4000\n",
      "Processing 1622 of 4000\n",
      "Processing 1623 of 4000\n",
      "Processing 1624 of 4000\n",
      "Processing 1625 of 4000\n",
      "Processing 1626 of 4000\n",
      "Processing 1627 of 4000\n",
      "Processing 1628 of 4000\n",
      "Processing 1629 of 4000\n",
      "Processing 1630 of 4000\n",
      "Processing 1631 of 4000\n",
      "Processing 1632 of 4000\n",
      "Processing 1633 of 4000\n",
      "Processing 1634 of 4000\n",
      "Processing 1635 of 4000\n",
      "Processing 1636 of 4000\n",
      "Processing 1637 of 4000\n",
      "Processing 1638 of 4000\n",
      "Processing 1639 of 4000\n",
      "Processing 1640 of 4000\n",
      "Processing 1641 of 4000\n",
      "Processing 1642 of 4000\n",
      "Processing 1643 of 4000\n",
      "Processing 1644 of 4000\n",
      "Processing 1645 of 4000\n",
      "Processing 1646 of 4000\n",
      "Processing 1647 of 4000\n",
      "Processing 1648 of 4000\n",
      "Processing 1649 of 4000\n",
      "Processing 1650 of 4000\n",
      "Processing 1651 of 4000\n",
      "Processing 1652 of 4000\n",
      "Processing 1653 of 4000\n",
      "Processing 1654 of 4000\n",
      "Processing 1655 of 4000\n",
      "Processing 1656 of 4000\n",
      "Processing 1657 of 4000\n",
      "Processing 1658 of 4000\n",
      "Processing 1659 of 4000\n",
      "Processing 1660 of 4000\n",
      "Processing 1661 of 4000\n",
      "Processing 1662 of 4000\n",
      "Processing 1663 of 4000\n",
      "Processing 1664 of 4000\n",
      "Processing 1665 of 4000\n",
      "Processing 1666 of 4000\n",
      "Processing 1667 of 4000\n",
      "Processing 1668 of 4000\n",
      "Processing 1669 of 4000\n",
      "Processing 1670 of 4000\n",
      "Processing 1671 of 4000\n",
      "Processing 1672 of 4000\n",
      "Processing 1673 of 4000\n",
      "Processing 1674 of 4000\n",
      "Processing 1675 of 4000\n",
      "Processing 1676 of 4000\n",
      "Processing 1677 of 4000\n",
      "Processing 1678 of 4000\n",
      "Processing 1679 of 4000\n",
      "Processing 1680 of 4000\n",
      "Processing 1681 of 4000\n",
      "Processing 1682 of 4000\n",
      "Processing 1683 of 4000\n",
      "Processing 1684 of 4000\n",
      "Processing 1685 of 4000\n"
     ],
     "output_type": "stream"
    }
   ],
   "source": [
    "import pickle\n",
    "import os\n",
    "\n",
    "import numpy as np\n",
    "from keras.models import load_model\n",
    "from numpy import ma\n",
    "from sklearn.metrics import confusion_matrix\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "from utils.data_utils import plot_confusion_matrix\n",
    "\n",
    "idp_model_path = 'D:/code/DoubleMU/models/palmPad_model.h5'\n",
    "idp_model = load_model(idp_model_path)\n",
    "\n",
    "label_dict = pickle.load(open('D:\\indexPen\\labels/label_dict.p', 'rb'))\n",
    "\n",
    "dataset_path = 'D:\\indexPen\\dataset'\n",
    "\n",
    "y_test = []\n",
    "y_pred_nn_output = []\n",
    "\n",
    "for i, sample_path in enumerate(os.listdir(dataset_path)):\n",
    "    print('Processing ' + str(i) + ' of ' + str(len(os.listdir(dataset_path))))\n",
    "    sample = (np.load(os.path.join(dataset_path, sample_path)))\n",
    "    y_pred_nn_output.append(idp_model.predict(np.expand_dims(sample, axis=0))[0])\n",
    "\n",
    "    y_test.append(label_dict[os.path.splitext(sample_path)[0]])\n",
    "\n",
    "y_test = np.asarray(y_test)\n",
    "y_pred = np.argmax(y_pred_nn_output, axis=1)\n",
    "\n",
    "plot_confusion_matrix(y_test, y_pred, classes=['A', 'D', 'L', 'M', 'P'], title='IndexPen Confusion Matrix')\n",
    "plt.show()\n",
    "\n",
    "correct_mask = (y_pred != y_test)\n",
    "incorrect_mask = (y_pred == y_test)\n",
    "\n",
    "y_correctly_masked_nn_output = ma.array(np.amax(y_pred_nn_output, axis=1), mask=correct_mask)\n",
    "y_correct_nn_output = y_correctly_masked_nn_output.compressed()\n",
    "\n",
    "y_wrongfully_masked_nn_output = ma.array(np.amax(y_pred_nn_output, axis=1), mask=incorrect_mask)\n",
    "y_wrong_nn_output = y_wrongfully_masked_nn_output.compressed()\n",
    "\n",
    "sorted_correct = np.sort(y_correct_nn_output)\n",
    "sorted_wrong = np.sort(y_wrong_nn_output)\n",
    "\n",
    "wrong_mean = np.mean(y_wrong_nn_output)\n",
    "correct_mean = np.mean(y_correct_nn_output)\n",
    "\n",
    "plt.plot(sorted_wrong)\n",
    "plt.plot(sorted_correct)\n",
    "\n",
    "plt.show()\n",
    "\n",
    "# Plot ROC --------------------------------------------------\n",
    "from sklearn.metrics import roc_curve\n",
    "fpr_keras, tpr_keras, thresholds_keras = roc_curve(y_test, y_pred)"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  },
  "kernelspec": {
   "name": "python3",
   "language": "python",
   "display_name": "Python 3"
  },
  "pycharm": {
   "stem_cell": {
    "cell_type": "raw",
    "source": [],
    "metadata": {
     "collapsed": false
    }
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}